% function testRadon
%
% Tests the functions PPFT,Optimized PPFT, and Radon.
% See also PPFT, OptimizedPPPT, Radon.
%
%  Yoel Shkolnisky 9/2/02

function testRadon2D
precision='double';
eps = 0.00000001;
im = magic(8);

[spp1,spp2] = slowPPFT2D(im,precision);
[pp1,pp2]   = PPFT2D(im,precision);
[opp1,opp2] = optimizedPPFT2D(im,precision);

if isempty(find(spp1-pp1>eps, 1)) || isempty(find(spp2-pp2>eps, 1))
    disp('PPFT OK');
else    disp('PPFT NOT OK');
end

if isempty(find(spp1-opp1>eps, 1)) || isempty(find(spp2-opp2>eps, 1))
    disp('OptmizedPPFT OK');
else    disp('OptmizedPPFT NOT OK');
end


[sr1,sr2] = slowRadon2D(im,precision);
[r1,r2]   = radon2D(im,precision);

if isempty(find(sr1-r1>eps, 1)) || isempty(find(sr2-r2>eps, 1))
    disp('Radon OK');
else    disp('Radon NOT OK');
end

 
